﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;

namespace Bus_proj.website
{
    public partial class WebFormtrstt : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string data_all = Request.QueryString["data_all"].ToString();
                string[] stemp = data_all.Split('*');
                string aaa = "20";
                float data1 = float.Parse(stemp[4]);
                float data2 = float.Parse(aaa);
                float sum = data1 + data2;
                ReportViewer1.LocalReport.DataSources.Clear();
                ReportParameter[] param = new ReportParameter[12];
                param[0] = new ReportParameter("data01", stemp[0]);
                param[1] = new ReportParameter("data_source", stemp[2]);
                param[2] = new ReportParameter("data_date", stemp[3]);
                param[3] = new ReportParameter("data_seat", stemp[7]);
                param[4] = new ReportParameter("data_platform", stemp[8]);
                param[5] = new ReportParameter("data_name", stemp[9]);
                param[6] = new ReportParameter("data_change", stemp[6]);
                param[7] = new ReportParameter("data_tax", aaa);
                param[8] = new ReportParameter("data_count", stemp[1]);
                param[9] = new ReportParameter("data_point", stemp[5]);
                param[10] = new ReportParameter("data_sum", stemp[4]);
                param[11] = new ReportParameter("data_sumandtax", sum.ToString());
                this.ReportViewer1.LocalReport.SetParameters(param);
                ReportViewer1.LocalReport.Refresh();
            }
           
        }
    }
}